<template>
  <view class="home index">
    <uni-popup ref="recommendPopup">
      <view class="home-tuijian">
        <view class="home-tuijian-price">￥200</view>
        <image :src="tjgz" mode="heightFix" style="height: 477rpx"></image>
        <text class="jiang">推荐一人，首月出勤满20次，奖励200元/人。</text>
        <button class="but but2" id="shareBtn" open-type="share" type="default" @click="recommendBtn">立即推荐</button>
        <view class="clonse">
          <image src="../../static/imgas/close.png" mode="heightFix" style="height: 51rpx" @click="closeRecommend"></image>
        </view>
      </view>
    </uni-popup>

    <!-- 授权手机号 -->

    <uni-popup ref="popup2" :mask-click="false">
      <view class="get-tel">
        <!-- <uni-icons class="ionc" type="closeempty" size="50r" @click="goBack"></uni-icons> -->
        <view class="tel-title"> 提示 </view>
        <view class="tel-text">您未绑定手机号，需要绑定手机号才可体验更多功能</view>
        <view class="but">
          <button class="butt" plain open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber">绑定手机号</button>
        </view>
      </view>
    </uni-popup>
    <!-- 授权手机号 -->
    <uni-popup ref="popup1">
      <view class="popup">
        <view class="p-title">
          <image :src="rzimg" mode="heightFix" style="height: 186rpx"></image>
        </view>
        <view class="p-b-card">
          <text class="c-text">请先完成实名认证信息,便于发放薪资,谢谢</text>
        </view>
        <view class="p-b-but">
          <button class="but but2" plain @click="renClick">立即认证</button>
        </view>
      </view>
    </uni-popup>
	
    <view class="home-boy">
      <view class="home-main">
        <view class="home-top">
          <view class="my-title-info" style="background-color: rgba(0,0,0,0);">
            <uni-list :border="false">
              <uni-list-item :border="false">
                <!-- 自定义 header -->
                <view slot="header" class="slot-box" @click="myClick('profile')">
                  <image class="slot-main-image" :src="cleaningData.avatar[0] || imgUrl3"></image>
                  <!-- 									<view class="s-b-text">
										{{['未上线','长期工','临时工'][cleaner_type]}}
									</view> -->
                </view>
                <!-- 自定义 body -->
                <view slot="body" class="slot-main">
                  <view class="slot-main-name">
                    {{ cleaningData.nickname || "" }}
                  </view>
           <!--       <view slot="body" class="slot-main" v-if="!cleaningData.loin">
                    <button class="but" type="primary" withCredentials="true" lang="zh_CN" @click="loinClick">立即登录</button>
                  </view> -->
				  <view class="personal" @click="myClick('profile')">个人资料</view>
                  <view
                    v-if="!cleaningData.wxopenid"
                    class="shouquan"
                    @click="openClick('Singlepage')"
                  >
                    <text>授权获取实时消息</text>
                    <uni-icons class="iocn" type="right" color="#000000" size="28r"></uni-icons>
                  </view>
                </view>
              </uni-list-item>
            </uni-list>
          </view>
          <!-- <view class="uni-margin-wrap uni-radius-lg">
            <swiper
              class="swiper"
              circular
              :indicator-dots="indicatorDots"
              :autoplay="autoplay"
              :interval="interval"
              :duration="duration"
            >
              <swiper-item :key="item.id" v-for="item in carouselData">
                <view class="swiper-item">
                  <image :src="item.cover[0]" mode="" style="width: 100%; height: 100%" @click="imgClick('report')"></image>
                </view>
              </swiper-item>
            </swiper>
          </view> -->
        </view>
      </view>
    </view>
	<!-- 平台奖励 -->
	<view class="award-box">
		<view class="award-title">平台奖励</view>
		<view class="award-btn" @tap="goTi">提现</view>
		<view class="award-price">{{platform_rewards}}</view>
	</view>
	<view class="home-tab">
	  <uni-row>
	    <uni-col :span="6" :key="item.id" v-for="item in tabData" @click.native="colsClick(item)">
	      <image class="h-t-img" :src="item.img" mode="aspectFit"></image>
	      <text class="h-t-text">{{ item.text || "未定义" }}</text>
	    </uni-col>
	  </uni-row>
	</view>
    <view style="display: none" class="home-butt">
      <button class="but" plain @click="onClick">上线接单</button>
    </view>
    <uni-popup ref="popup" @change="change">
      <view class="popup">
        <view class="p-title">
          <image :src="bejing" mode="heightFix" style="height: 186rpx"></image>
          <text class="t-text">请选择上线身份</text>
        </view>
        <view class="p-b-box"></view>
        <view class="p-b-but">
          <button class="but" plain @click="addClick(2)">临时工</button>
          <button class="but but1" plain @click="addClick(1)">长期工</button>
        </view>
      </view>
    </uni-popup>
    <uni-popup ref="popup3" @change="change" type="bottom" :mask-click="false">
      <view class="get-tate">
        <view class="g-t-box">
          <view class="scroll-h">
            <text class="scroll-h-text">请选择上线时间</text>
          </view>
          <view class="" v-if="dateState">
            <reserve-date
              @changeDay="changeDay"
              @changeMonth="changeMonth"
              :startDate="startDate"
              :price="price"
              :isNowDate="isNowDate"
              :disableBefore="disableBefore"
              :endDate="endDate"
              :singleElection="singleElection"
              :date="dates"
            />
          </view>
        </view>
        <view class="p-b-but">
          <button class="but" plain @click="dateQvClick">取消</button>
          <button class="but but1" plain @click="dateAddClick">确定</button>
        </view>
      </view>
    </uni-popup>
	<!-- 底部导航栏 -->
	<view class="tabbar">
		<view v-for="(item,index) in tabbarList" :key="index" class="tab-item" @tap="goPage(index)">
			<image :src="item.img" mode=""></image>
			<view class="">{{item.title}}</view>
		</view>
	</view>
  </view>
</template>

<script>
function getDate(date, AddDayCount = 0, index = 0) {
  if (!date) {
    date = new Date();
  }
  if (typeof date !== "object") {
    date = date.replace(/-/g, "/");
  }
  const dd = new Date(date);

  dd.setDate(dd.getDate() + AddDayCount); // 获取AddDayCount天后的日期

  const y = dd.getFullYear() + index;
  const m = dd.getMonth() + 1 < 10 ? "0" + (dd.getMonth() + 1) : dd.getMonth() + 1; // 获取当前月份的日期，不足10补0
  const d = dd.getDate() < 10 ? "0" + dd.getDate() : dd.getDate(); // 获取当前几号，不足10补0
  return {
    fullDate: y + "-" + m + "-" + d,
    year: y,
    month: m,
    date: d,
    day: dd.getDay(),
  };
}
export default {
  data() {
    return {
      bejing: `${getApp().globalData.imgScr}bj/bejing.png`,
      zanwudingdan: `${getApp().globalData.imgScr}bj/zanwudingdan.png`,
      tjgz: `${getApp().globalData.imgScr}bj/tjgz.png`,

      url: "/cleaningAdmin",
      rzimg: `${getApp().globalData.imgScr}bj/rz.png`,
      url1: "/cleaningAdmin/my-indent",
      imgUrl3: `${getApp().globalData.imgScr}jd/uimg.svg`,
      cleaningData: {},
      cleaner_type: uni.getStorageSync("cleaningData") ? uni.getStorageSync("cleaningData").type : 0, // 上线身份
      logo: false,
      carouselData: [], // 轮播图数据
      OpenId: "",
      nickName: null,
      avatarUrl: null,
      listData: [], //  录用订单列表数据
      indicatorDots: false, // 小圆点显示开关
	  isShow: false, // 客服开关
	  serviceList: [
		{img:'/static/imgas/lianxikefu.png',title:'联系客服'},  
		{img:'/static/imgas/jinjianzhiqun.png',title:'进兼职群'},  
		{img:'/static/imgas/chengweidaili.png',title:'成为代理'},  
	  ],
	  navActive: 0,
	  navList:[
		{img:'/static/imgas/kefang.png',title:'客房'},  
		{img:'/static/imgas/canyin.png',title:'餐饮'},  
		{img:'/static/imgas/kefang.png',title:'其他'},  
	  ],
	  platform_rewards: '0',
	  tabbarList:[
		{img:'/static/imgas/jianzhi.png',title:'兼职'},
		{img:'/static/imgas/dingdan.png',title:'订单'},
		{img:'/static/imgas/wode_xz.png',title:'我的'},
	  ],
      autoplay: false, // 自动播放开关
      interval: 2000, // 自动切换时间
      duration: 500, // 滑动动画时间
      logo: `${getApp().globalData.imgScr}jd/logo.png`,
      tabData: [
        // 中间操作tab 的数据
        // {
        // 	id: 1,
        // 	img: `${getApp().globalData.imgScr}bj/quanbudingdan.png`,
        // 	text: '全部订单',
        // 	path: 'my-indent',
        // },

        {
          id: 1,
          // img: `${getApp().globalData.imgScr}bj/wodeqianbao.png`,
          img: "/static/imgas/wodeqianbao.png",
          text: "我的工资",
          path: "my-wallet",
        },
        {
          id: 2,
          // img: `${getApp().globalData.imgScr}bj/wodepingjia.png`,
		  img: "/static/imgas/wodefuli.png",
		  text: "我的福利",
		  path: "my-wealth",
        },
		{
		  id: 3,
		  //   img: `${getApp().globalData.imgScr}bj/tueijianjilu.png`,
		  img: "/static/imgas/jianglimingxi.png",
		  text: "积分明细",
		  path: "my-score",
		},
        {
          id: 4,
          //   img: `${getApp().globalData.imgScr}bj/wodefuli.png`,
          img: "/static/imgas/wodepingjia.png",
          text: "我的评价",
          path: "my-evaluate",
        },
        {
          id: 5,
          //   img: `${getApp().globalData.imgScr}bj/jianglizhengce.png`,
          img: "/static/imgas/jianglizhengce.png",
          text: "奖励政策",
          path: "my-award",
        },
        {
          id: 6,
          //   img: `${getApp().globalData.imgScr}bj/tueijianyoujiang.png`,
          img: "/static/imgas/tueijianyoujiang.png",
          text: "推荐有奖",
          path: "my-recommend",
        },
        
        {
          id: 7,
          //   img: `${getApp().globalData.imgScr}bj/baozhengjin1.png`,
          img: "/static/imgas/jiandujubao.png",
          text: "监督举报",
          path: "report",
        },
		{
		  id: 8,
		  //   img: `${getApp().globalData.imgScr}bj/baozhengjin1.png`,
		  img: "/static/imgas/baozhengjin1.png",
		  text: "保证金",
		  path: "my-deposit",
		},
		{
		  id: 9,
		  img: "/static/imgas/baozhengjin1.png",
		  text: "违约记录",
		  path: "my-contract",
		},
		// {
		//   id: 10,
		//   // img: `${getApp().globalData.imgScr}bj/wodeqianbao.png`,
		//   img: "/static/imgas/wodeqianbao.png",
		//   text: "我的微工卡",
		//   path: "my-card",
		// },
        // {
        // 	id: 9,
        // 	img: `${getApp().globalData.imgScr}bj/zaixinjilu.png`,
        // 	text: '在线记录',
        // 	path: 'my-check',
        // },
        // {
        // 	id: 10,
        // 	img: `${getApp().globalData.imgScr}bj/kefuzhongxin.png`,
        // 	text: '客服中心',
        // 	path: 'my-service',
        // }
      ],
      tabIndex: 2, // 上线窗口切换栏状态 2：临时工 1：长期工
      dates: getDate(new Date()).fullDate,
      price: {
        type: false,
        data: [],
      },
      total: 0,
      page: 1,
      limit: 15,
      isloading: false,
      belong_date: "", // 选择的日期
      dateState: false, // 上线日期组件关闭时清空
      isNowDate: false,
      disableBefore: false,
      endDate: getDate(new Date(), 0, 3).fullDate, // 可选取的截至时间
      startDate: getDate(new Date()).fullDate, // 可选取的起始时间
      singleElection: false,
      locationObj: {
        latitude: "",
        longitude: "",
      },
    };
  },
  onLoad() {
    getApp().globalData.type = 2;
    if (uni.getStorageSync("cleaningData")) this.cleaningData = uni.getStorageSync("cleaningData");
    this.getCarouse();
    if (uni.getStorageSync("cleaningData").state == 0 && uni.getStorageSync("cleaningData").loin) this.$refs.popup1.open();
  },
  // 下拉刷新的事件
  onPullDownRefresh() {
    // 1. 重置关键数据
    this.page = 1;
    this.isloading = false;
    this.listData = [];
    this.total = 0;
    setTimeout(() => {
      uni.showToast({
        title: "刷新成功",
        icon: "none",
      });
    }, 300);
    // 2. 重新发起请求
    // this.getLsitClick();
    uni.stopPullDownRefresh();
  },
  onReachBottom() {
    if (uni.getStorageSync("cleaningData").loin) {
      if (this.page * this.limit >= this.total)
        return uni.showToast({
          title: "数据加载完毕！",
          icon: "none",
        });
      //触底后页数增加
      if (this.isloading) return;
      this.page++;
      // this.getLsitClick();
    }
  },
  onReady() {
    // if (uni.getStorageSync("cleaningData").loin && uni.getStorageSync("cleaningData").state === 2) {
    //   this.clickRecommend();
    // }
  },
  onShow() {
    this.getCarouse();
    if (uni.getStorageSync("cleaningData").loin) {
      this.userinfo();
      // this.getLsitClick();
      console.log("已登录");
    } else {
      console.log("未登录");
    }
  },
  methods: {
    /**
     * 保洁端  登录认证
     */
	cut(i){
		if(i==2){
			uni.showToast({
				title: '暂未开放',
				icon: 'none'
			})
			return
		}
		this.navActive = i
	},
	goPage(i){
		if(i==0){
			uni.navigateTo({
				url: '/cleaningAdmin/home/home'
			})
		}else if (i==1){
			uni.redirectTo({
				url: '/cleaningAdmin/my-indent/my-indent'
			})
		}
	},
    loinClick() {
      let _this = this;
      uni.getUserProfile({
        desc: "用于小程序功能使用",
        success: function (e) {
          // 调用微信登录
          _this.login(e.userInfo);
        },
        fail: (e) => {
          // 拒绝授权
          uni.showToast({
            title: "登录失败",
            icon: "none",
          });
        },
      });
    },
    /**
     * 微信登录
     * @param {Object} info 授权成功获取的用户信息
     */
    async login(info) {
      let _this = this;
      uni.showLoading({
        title: "登录中....",
      });
      getApp().globalData.type = 2;
      try {
        /** === 1.wx获取登录用户code === */
        let res = await uni.login({
          provider: "weixin",
        });
        // 判断是否登录成功
        if (res[0] != null) throw new Error("授权登录失败！请重新登录");
        // console.log('res =====>',res)
        // 获取code
        let code = res[1].code;
        // console.log('code =====>',code)
        /** === 2.wx获取登录用户openid 等信息 === */
        let rep = await _this.$http.post("/index/Login/getuserinfo", {
          code,
        });
        uni.hideLoading();
        // 获取保洁位置存到本地
        let location = await uni.getLocation();
        this.$set(this.cleaningData, "latitude", location[1].latitude);
        this.$set(this.cleaningData, "longitude", location[1].longitude);
        console.log("rep =====>", rep);
        // 保存session_key  用于手机号获取解密
        this.$set(this.cleaningData, "session", rep.session_key);
        // 保存 openid
        this.$set(this.cleaningData, "openid", rep.openid);
        uni.setStorageSync("openid", rep.openid);
        // console.log('rep =====>',rep)
        /** === 3.请求获取 token === */
        await this.getuid(info, rep.openid, rep.unionid);
        // this.getLsitClick();

        /** === 4.请求获取 手机号 === */
        let reo = await _this.$http.post(
          "/index/Login/getphone",
          {},
          {
            header: {
              token: this.cleaningData.token,
            },
          }
        );
        // console.log('用户手机号',reo.phone)
        // 保存用户手机
        this.$set(this.cleaningData, "phone", reo.phone);
        // console.log('用户手机号',reo.phone)
        // 本地同步缓存 登录获取的相关信息
        uni.setStorageSync("cleaningData", this.cleaningData);
        if (uni.getStorageSync("order_id") > 0) {
          uni.redirectTo({
            url: "/cleaningAdmin/my-indent/details/details?id=" + uni.getStorageSync("order_id"),
          });
        }

        uni.hideLoading();
        // 判断是否弹出个人认证窗口
        if (this.cleaningData.state == 0) this.$refs.popup1.open("center");
        else if (this.cleaningData.state == 2) this.okClick("员工端");
        else if (this.cleaningData.state == 3)
          uni.showToast({
            title: "认证未通过！请重新认证！",
            icon: "none",
            success() {
              _this.$refs.popup1.open("center");
            },
          });
        else {
          uni.showToast({
            title: "认证审核中！敬请等待！",
            icon: "none",
          });
        }
        // uni.navigateTo({
        // 	url: "/cleaningAdmin/home/home"
        // });
      } catch (e) {
        uni.hideLoading();
        if (e.statusCode == 1004) this.$refs.popup2.open("center");
        else
          uni.showToast({
            title: e.errMsg,
            icon: "none",
          });
      }
    },
  
	/**
     * 获取 token
     */
    async getuid(info, openid, unionid) {
      try {
        let res = await this.$http.post("/index/Login/getuid", {
          openid: openid,
          unionid: unionid,
          parent_openid: uni.getStorageSync("parent_openid") || "",
          type: 2,
          userInfo: {
            nickname: info.nickName,
            avatar: info.avatarUrl,
            gender: info.gender,
          },
        });
        // console.log('res =====>',res)
        // 保存token
        this.$set(this.cleaningData, "token", res.token);
        // 缓存token 到本地
        uni.setStorageSync("cleaningData", this.cleaningData);
        // 获取用户信息
        await this.userinfo(res.token);
      } catch (e) {
        throw new Error(e);
      }
    },
    /**
     * 个人信息编辑页面
     * @param {string} path 需要跳转的页面路径
     */
    myClick(path, id = 1) {
      let _this = this;
      uni.navigateTo({
        url: `${_this.url}/${path}/${path}?id=${id}`,
      });
    },
    /**
     * 点击广告图片时触发
     * @param {string} path 需要跳转的页面路径
     */
    imgClick(path) {
      if (uni.getStorageSync("cleaningData").loin) {
        uni.navigateTo({
          url: `${this.url}/${path}/${path}`,
        });
      } else {
        uni.showToast({
          title: "请登录并且认证通过后再试！",
          icon: "none",
        });
      }
    },
    /**
     * 中间小卡片 对应的操作
     * @param {string} data 需要跳转的页面路径
     */
    colsClick(data) {
      let path = this.url + "/my-approve/my-approve";



      if (uni.getStorageSync("cleaningData").loin) {
        if (uni.getStorageSync("cleaningData").state > 0) {
          console.log(`${this.url}/${data.path}/${data.path}`);
          if (data.path == "my-wallet") {
            uni.navigateTo({
              url: `${this.url}/${data.path}/details/details`,
            });
          }else if (data.text == "我的微工卡") {
			  
			  
			if(uni.getStorageSync("cleaningData").state === 0 || uni.getStorageSync("cleaningData").state === 3){
				uni.showToast({
				  title: "请先提交认证信息！",
				  icon: "none",
				});
				let path = this.url + "/my-approve/my-approve";
				setTimeout(function () {
				  uni.navigateTo({
				    url: path,
				  });
				}, 1500);
					return
			}  
            this.$http.post('/index/Cleanerindex/payroll_card_tokens', []).then(res => {
            	uni.hideLoading()
				if(res.mchid){
					wx.navigateToMiniProgram({
					  appId: 'wxd24d9057cd83d47a',
					  path: '/pages/card/auth?mchid='+res.mchid+'&sub_mchid='+res.sub_mchid+'&sub_appid=wx1ebac1c22bce39d1&token='+res.token+'&openid='+res.openid+'',
					  success(res) {
						  
						  console.log(res);
					    // 打开成功
					  }
					})
				}else{
					uni.showToast({
					  title: res.msg,
					  icon: "none",
					});
					let path = this.url + "/my-approve/my-approve";
					setTimeout(function () {
					  uni.navigateTo({
					    url: path,
					  });
					}, 1500);
					return
				}
			
            	
            }).catch(res => {
            	uni.hideLoading()
            	uni.showToast({
            		title: res.errMsg,
            		icon: "none"
            	})
            })
			
			
			
          } else {
            uni.navigateTo({
              url: `${this.url}/${data.path}/${data.path}`,
            });
          }
        } else if (uni.getStorageSync("cleaningData").state === 0) {
          uni.showToast({
            title: "请先提交认证信息！",
            icon: "none",
          });
          setTimeout(function () {
            uni.navigateTo({
              url: path,
            });
          }, 1500);
        } else {
          if (data.text == "客服中心") {
            uni.navigateTo({
              url: `${this.url}/${data.path}/${data.path}`,
            });
          }else if (data.text == "我的微工卡") {
			  if(uni.getStorageSync("cleaningData").state === 0 || uni.getStorageSync("cleaningData").state === 3){
			  	uni.showToast({
			  	  title: "请先提交认证信息！",
			  	  icon: "none",
			  	});
			  	let path = this.url + "/my-approve/my-approve";
			  	setTimeout(function () {
			  	  uni.navigateTo({
			  	    url: path,
			  	  });
			  	}, 1500);
				return
			  } 
            this.$http.post('/index/Cleanerindex/payroll_card_tokens', []).then(res => {
            	uni.hideLoading()
			
			if(res.mchid){
				wx.navigateToMiniProgram({
				  appId: 'wxd24d9057cd83d47a',
				  path: '/pages/card/auth?mchid='+res.mchid+'&sub_mchid='+res.sub_mchid+'&sub_appid=wx1ebac1c22bce39d1&token='+res.token+'&openid='+res.openid+'',
				  success(res) {
					  
					  console.log(res);
				    // 打开成功
				  }
				})
			}else{
				uni.showToast({
				  title:res.msg,
				  icon: "none",
				});
				let path = this.url + "/my-approve/my-approve";
				setTimeout(function () {
				  uni.navigateTo({
				    url: path,
				  });
				}, 1500);
				return
			}
			
				// wx.navigateToMiniProgram({
				//   appId: 'wxd24d9057cd83d47a',
				//   path: '/pages/card/card?mchid='+res.mchid+'&sub_mchid='+res.sub_mchid+'&sub_appid=wx1ebac1c22bce39d1&token='+res.token+'&openid='+res.openid,
				//   success(res) {
				//     // 打开成功
				//   }
				// })
            }).catch(res => {
            	uni.hideLoading()
            	uni.showToast({
            		title: res.errMsg,
            		icon: "none"
            	})
            })
			
			
			
          } else {
            uni.showToast({
              title: "请认证通过后再试！",
              icon: "none",
            });
          }
        }
      } else {
        if (data.text == "客服中心") {
          uni.navigateTo({
            url: `${this.url}/${data.path}/${data.path}`,
          });
        } else {
          uni.showToast({
            title: "请登录后再试！",
            icon: "none",
          });
        }
      }
    },
    /**
     * 订单列表卡片 点击事件
     * @param {number} id 当前列表的id
     */
    listClick(item) {
      if (uni.getStorageSync("cleaningData").state !== 2) {
        uni.showToast({
          title: "请登录并且认证通过后再试!",
          icon: "none",
        });
      } else {
        if (item.is_full != 1) {
          let path = this.url1 + "/details/details";
          let id = item.id;
          uni.navigateTo({
            url: `${path}?id=${id}`,
          });
        }
      }
    },
    /**
     * 底部上下线按钮事件
     */
    onClick() {
      if (!uni.getStorageSync("cleaningData").loin)
        return uni.showToast({
          title: "请登陆后在体验更多功能！",
          icon: "none",
        });
      else if (uni.getStorageSync("cleaningData").state != 2)
        return uni.showToast({
          title: "实名认证通过后即可接单！",
          icon: "none",
        });
      else this.$refs.popup.open("center");
    },
    /**
     * 弹出层状态发生变化触发
     * @param {Object} e  e={show: true｜false,type:当前模式}
     */
    change: function (e) {
      // console.log(e)
    },
    /**
     * 上线选择身份 定按钮
     */
    addClick(i) {
      this.$refs.popup.close();
      this.$refs.popup3.open();
      this.dateState = true;
      this.tabIndex = i;
    },
    /**
     * 上线选择日期 取消按钮
     */
    dateQvClick() {
      this.$refs.popup3.close();
      this.dateState = false;
      this.tabIndex = "";
      this.belong_date = "";
    },
    /**
     * 上线选择日期确定按钮 确定按钮
     */
    async dateAddClick() {
      if (this.tabIndex != 1 && this.tabIndex != 2) {
        this.dateQvClick();
        return uni.showToast({
          title: "请选择上线身份！",
          icon: "none",
        });
      }
      // 长期工临时工身份
      let cleaner_type = this.tabIndex;
      // 上线时间
      let belong_date = this.belong_date;
      try {
        if (belong_date) {
          let res = await this.$http.post("/index/Cleanerindex/cleaner_online", {
            cleaner_type,
            belong_date,
          });
          this.cleaner_type = this.tabIndex;
          uni.showToast({
            title: "上线成功",
          });
          this.cleaner_type = this.tabIndex;
          this.$refs.popup3.close();
          this.dateState = false;
          this.tabIndex = 0;
        } else {
          uni.showToast({
            title: "请选择日期",
            icon: "none",
          });
        }
      } catch (e) {
        uni.showToast({
          title: e.errMsg,
          icon: "none",
        });
        //TODO handle the exception
      }
    },
    // 上线选择日期 日期改变
    changeDay(date) {
      this.belong_date = date.toString();
    },
    /**
     * 立即认证按钮
     */
    renClick() {
      this.$refs.popup1.close();
      let path = this.url + "/my-approve/my-approve";
      uni.navigateTo({
        url: path,
      });
    },
    //上线选择日期 月改变
    changeMonth(data) {},
    /**
     * 获取轮播图数据
     */
    getCarouse() {
      let _this = this;
      this.$http
        .get("/index/Communal/banner", {
          cate: 2,
        })
        .then(function (res) {
          _this.carouselData = res;
        })
        .catch(function (e) {
          throw new Error(e);
        });
    },
	goTi(){
		if (uni.getStorageSync("cleaningData").state !== 2) {
		  uni.showToast({
		    title: "请登录并且认证通过后再试!",
		    icon: "none",
		  });
		  return
		}
		if(this.platform_rewards==0){
			uni.showToast({
				title: '提现金额不足',
				icon:'none'
			})
			return
		}
		uni.navigateTo({
			url: '/cleaningAdmin/deposit/deposit?platform_rewards=' + this.platform_rewards
		})
	},
    /**
     * 获取录用订单列表
     */
    async getLsitClick() {
      this.isloading = true;
      uni.showLoading({
        title: "加载中...",
        mask: true,
      });
      try {
        let res = await this.$http.post("/index/Cleanerindex/mission_hall", {
          page: this.page,
          limit: this.limit,
          cleaner_longitude: uni.getStorageSync("cleaningData").longitude,
          cleaner_latitude: uni.getStorageSync("cleaningData").latitude,
        });
        uni.hideLoading();
        this.isloading = false;
        // this.listData = res.data,
        this.total = res.total;
        if (res.total > 0) {
          this.listData = [...this.listData, ...res.data];
          let obj1 = {};
          this.listData = this.listData.reduce((item, index) => {
            obj1[index.id] ? "" : (obj1[index.id] = true && item.push(index));
            return item;
          }, []);
        } else {
          this.listData = [];
        }

        console.log("this.listData", this.listData);
      } catch (e) {
        uni.hideLoading();
        //TODO handle the exception
        throw new Error(e);
      }
    },

    /**
     * 获取用户信息
     */
    async userinfo() {
      try {
        // console.log('token =====>',token)
        let res = await this.$http.post("/index/Login/userinfo");
		this.platform_rewards = res.platform_rewards
        // console.log('res =====>',res)
        this.$set(this.cleaningData, "nickname", res.real_name || res.nickname); // 昵称
        this.$set(this.cleaningData, "avatar", res.avatar); // 头像
        this.$set(this.cleaningData, "gender", res.gender); // 性别
        this.$set(this.cleaningData, "phone", res.phone); // 电话
        this.$set(this.cleaningData, "address", res.address); // 地址
        this.$set(this.cleaningData, "state", res.cleaner_status); // 保洁认证状态
        this.$set(this.cleaningData, "type", res.cleaner_type); // 保洁类型
        this.$set(this.cleaningData, "wxopenid", res.wxopenid); // 微信公众openid
		this.$set(this.cleaningData, "payroll_card", res.payroll_card); // 微工卡状态
        this.$set(this.cleaningData, "loin", true); // 更改登录状态
        uni.setStorageSync("cleaningData", this.cleaningData);
        let time = this.dateFormat(new Date().getTime());
        let timestamp = this.dateFormat(new Date().getTime() - 24 * 60 * 60 * 1000);
		
		if(res.payroll_card != 1){
			
				this.$refs.popup1.open("center");
			}
        if (res.cleaner_status === 2) {
          console.log("uni.getStorageSync", uni.getStorageSync(time));
          if (!uni.getStorageSync(time)) {
            uni.setStorageSync(time, 1);
            this.clickRecommend();
            if (uni.getStorageSync(timestamp)) {
              uni.removeStorage(timestamp);
            }
          } else {
            this.closeRecommend();
          }
        }else if(res.cleaner_status === 3){
			uni.showToast({
			  title: "认证未通过！请重新认证！",
			  icon: "none",
			});
			this.$refs.popup1.open("center");
		}
        time = 0;
        // this.loin = uni.getStorageSync('cleaningData').loin
      } catch (e) {
        throw new Error(e);
      }
    },
    /**
     * 认证手机号 按钮触发事件
     *  @param {Object} e 手机认证成功后返回的数据
     */
    async decryptPhoneNumber(e) {
      let _this = this;
      // 请求参数
      let data = {
        session: this.cleaningData.session,
        iv: e.target.iv,
        encryptedData: e.target.encryptedData,
      };
      try {
        // 获取用户手机号码
        let res = await this.$http.post("/index/Login/decryptphone", data);
        // 保存用户手机
        this.$set(this.cleaningData, "phone", res.phoneNumber);

        // 将手机号码发送到服务器
        let phoneData = await this.$http.post("/index/Login/updatephone", {
          phone: res.phoneNumber,
        });
        // 关闭 绑定手机号弹窗
        this.$refs.popup2.close("center");
        // 同步保存数据到本地 token 登录状态 认证状态 手机号
        uni.setStorageSync("cleaningData", this.cleaningData);

        if (uni.getStorageSync("order_id")) {
          uni.navigateTo({
            url: "/cleaningAdmin/my-indent/details/details?id=" + uni.getStorageSync("order_id"),
          });
        }

        // 判断是否弹出个人认证窗口
        if (this.cleaningData.state == 0 && this.cleaningData.loin && this.cleaningData.phone) this.$refs.popup1.open("center");
        else if (this.cleaningData.state == 2) this.okClick("员工端");
        else if (this.cleaningData.state == 3)
          uni.showToast({
            title: "认证未通过！请重新认证！",
            icon: "none",
            success() {
              _this.$refs.popup1.open("center");
            },
          });
        else {
          // uni.removeStorageSync('cleaningData');
          // uni.removeStorageSync('openid');
          uni.showToast({
            title: "认证审核中！敬请等待！",
            icon: "none",
          });
        }
      } catch (e) {
        // 拒绝后返回手机认证弹窗
        uni.showToast({
          title: e.errMsg,
          icon: "none",
        });
        // this.cleaningData = {};
        // uni.removeStorageSync('cleaningData');
        // return
      }
    },
    /**
     * 授权接收信息
     * @param {Object} path
     */
    openClick(path) {
      uni.navigateTo({
        url: `${this.url}/${path}/${path}`,
      });
    },
    recommendBtn() {
      console.log("推荐");
    },
    // 立即推荐按钮事件
    onShareAppMessage: function (ops) {
      let order_id = this.order_id;
      if (ops.from === "button") {
        // 来自页面内转发按钮
      }
      return {
        title: uni.getStorageSync("wechat_share_title"),
        path: `pages/index/index?scene=${uni.getStorageSync("cleaningData").openid}`, // 路径，传递参数到指定页面。
        imageUrl: uni.getStorageSync("wechat_share_image")[0], // 分享的封面图
      };
    },
    goBack() {
      uni.removeStorageSync("cleaningData");
      uni.removeStorageSync("openid");
      this.$refs.popup2.close("center");
    },
    /**
     *
     * 推荐弹框
     */
    clickRecommend() {
      this.$refs.recommendPopup.open();
    },
    closeRecommend() {
      // TODO 做一些其他的事情，before-close 为true的情况下，手动执行 close 才会关闭对话框
      // ...
      this.$refs.recommendPopup.close();
    },
    // 时间处理
    dateFormat(time) {
      let date = new Date(time);
      let year = date.getFullYear();
      // 在日期格式中，月份是从0开始的，因此要加0，使用三元表达式在小于10的前面加0，以达到格式统一  如 09:11:05
      let month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
      let day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
      let hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
      let minutes = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
      let seconds = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
      // 拼接
      // return year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
      return year + "-" + month + "-" + day;
    },
  },
};
</script>

<style lang="scss">
.uni-list {
  background-color: rgba(0,0,0,0) !important;
}
.uni-list-item {
  margin-bottom: 20rpx !important;
  background-color: rgba(0,0,0,0) !important;
}
.wParse-img {
  width: 100%;
  margin: 0.3em auto;
  display: block;
  position: relative;
}

.day_word {
  text-indent: 2em;
  margin: 0.5em auto;
  padding-bottom: 0.5em;
  font-family: KaiTi;
}

.home {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  // padding-bottom: 200rpx;
  padding-bottom: 20rpx;
  // height: 100vh;
  // overflow: hidden;

  .home-tuijian {
    margin: 0 auto;
    text-align: center;
    position: relative;

    .home-tuijian-price {
      width: 187rpx;
      height: 66rpx;
      color: #f6bb6d;
      font-family: AlibabaPuHuiTiR;
      position: absolute;
      top: 90rpx;
      left: 160rpx;
      font-weight: 700;
      font-size: 50.85rpx;
    }

    .jiang {
      position: absolute;
      left: 120rpx;
      bottom: 220rpx;
      width: 300rpx;
      height: 100rpx;
      font-size: 28rpx;
      color: #ffffff;
    }

    .but2 {
      position: absolute;
      left: 140rpx;
      bottom: 160rpx;
      width: 243rpx;
      height: 55rpx;
      line-height: 55rpx;
      color: #b74c0e;
      font-weight: Bold;
      font-size: 32.61rpx;
      background: linear-gradient(101deg, #ffda89 0%, #ffcd34 100%);
      border: 0;
      border-radius: 40rpx;
    }

    .clonse {
      margin-top: 51rpx;
    }
  }

  .home-boy {
    flex: 1;
    overflow: hidden;
	width: 100%;
  }

  .home-main {
    // height: calc(100% - var(--status-bar-height));
    height: 100%;
    overflow: auto;

    .home-top {
      width: 100%;
      // background-color: #ffffff;
	  background: #8dc9f1;
      box-sizing: border-box;
      padding: 80rpx 0rpx 80rpx 20rpx;
      margin-bottom: 32rpx;

      .home-title {
        display: flex;
        align-items: center;
        margin-bottom: 20rpx;

        .h-t-img {
          height: 80rpx;
          width: 80rpx;
          border-radius: 40rpx;
          border: 0;
          margin-right: 20rpx;
        }

        .h-t-text {
          font-size: 28rpx;
          font-weight: 500;
          color: #333333;
        }
      }

      .my-title-info {
        .slot-box {
          position: relative;
          height: 120rpx;
          width: 120rpx;
          border-radius: 60rpx;
          overflow: hidden;
          margin-right: 20rpx;

          .slot-main-image {
            width: 100%;
            height: 100%;
          }

          .s-b-text {
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            text-align: center;
            line-height: 40rpx;
            background-color: rgba($color: #000000, $alpha: 0.4);
            font-size: 20rpx;
            font-weight: 400;
            color: #ffffff;
          }
        }

        .slot-main {
          display: flex;
          flex-direction: column;
          justify-content: center;

          .shouquan {
            font-size: 28rpx;
            font-weight: 500;
            color: #000000;
            margin-top: 20rpx;
          }

          .slot-main-name {
            font-size: 34rpx;
            color: #000000;
          }

          .but {
            font-size: 34rpx;
            // width: 560rpx;
            font-weight: 500;
            color: #fff;
            background-color: rgba($color: #000000, $alpha: 0);
            border-radius: 48rpx;
            line-height: 96rpx;
            padding: 0 20rpx;
            border: 0;
          }

          .but::after {
            display: none;
          }
        }
		
      }

      .uni-margin-wrap {
        box-sizing: border-box;
        width: 100%;
        margin-bottom: 40rpx;
        overflow: hidden;

        .swiper {
          width: 100%;
          height: 320rpx;

          .swiper-item {
            width: 100%;
            height: 100%;
            display: block;
            text-align: center;
          }
        }
      }
      
    }
	.personal{
		position: absolute;
		right: 0;
		width: 170rpx;
		height: 64rpx;
		text-align: center;
		line-height: 64rpx;
		border-radius: 64rpx 0 0 64rpx;
		top: 50%;
		transform: translateY(-50%);
		font-size: 30rpx;
		color: #000;
		background-color: #48AEEC;
		z-index: 222;
	}
    .uni-section {
      // height: 56vh;

      .line {
        background-color: #d8eefc;
      }

      .home-empty {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 400rpx;

        .h-o-img {
          width: 226rpx;
          height: 264rpx;
          margin-bottom: 20rpx;
        }

        .h-o-text {
          font-size: 28rpx;
          font-weight: 600;
          color: #333333;
        }
      }

      .home-order {
        .v-slot-body-box {
          width: 100%;
        }

        .v-slot-header {
          position: relative;
          margin-right: 20rpx;
          width: 160rpx;
          height: 160rpx;

          image {
            width: 160rpx;
            height: 160rpx;
            border-radius: 15rpx;
          }

          &-son {
            width: 120rpx;
            height: 120rpx;
            margin: -60rpx 0 0 -60rpx;
            position: absolute;
            left: 50%;
            top: 50%;
            border-radius: 60rpx;
            background-color: rgba(255, 255, 255, 0.23);
            line-height: 120rpx;
            text-align: center;
            font-weight: bold;

            text {
              color: #fff;
              opacity: 0.9;
            }
          }
        }

        .v-slot-body {
          font-weight: bold;
          font-size: 30rpx;
          font-family: PingFang-SC-Bold;
          margin-bottom: 20rpx;

          text {
            margin-right: 10rpx;
          }
        }

        .h-o-b-main {
          display: flex;
          justify-content: flex-start;
          margin-bottom: 20rpx;
          align-items: center;

          &-son {
            font-weight: bold;
            font-size: 28rpx;
          }

          &-anticipated_revenue {
            font-size: 26rpx;
            opacity: 0.9;
          }

          .juli {
            opacity: 0.5;
            font-size: 26rpx;
          }

          .anticipated_revenue {
            font-size: 28rpx;
            font-size: 500;
            color: rgba($color: #000000, $alpha: 0.9);
          }

          .h-o-b-main-son {
            font-size: 30rpx;

            .unit_price {
              color: #ff4b4b;
              font-weight: bold;
              font-size: 30rpx;
            }
          }

          .recommend {
            display: flex;
            width: 214rpx;
            height: 50rpx;
            justify-content: center;
            text-align: center;
            line-height: 46rpx;
            margin-left: 20rpx;
            box-sizing: border-box;
            font-size: 24rpx;

            .recommend-l {
              background-color: #fff;
              width: 40%;
              color: #000;
              border-radius: 10rpx 0 0 10rpx;
              border: 2rpx solid #d8eefc;
            }

            .recommend-r {
              background-color: #d8eefc;
              width: 60%;
              color: #fff;
              border-radius: 0rpx 10rpx 10rpx 0rpx;
              border: 2rpx solid #d8eefc;
            }
          }
        }

        // 列表中下划线隐藏
        .uni-list--border-bottom,
        .uni-list--border-top {
          display: none;
        }

        // 列表每一项内容的样式
        .uni-list-item__container {
          box-sizing: border-box;
          padding: 32rpx;
        }

        .h-o-con {
          display: flex;
          align-items: center;
          width: 100%;

          .h-o-c-img {
            width: 146rpx;
            height: 146rpx;
            border-radius: 20rpx;
            border: 0;
            margin-right: 20rpx;
          }

          .h-o-boy {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            height: 146rpx;

            .h-o-b-title {
              // display: flex;
              // justify-content: space-between;
              // align-items: center;
              // padding: 10rpx 0;
            }
          }
        }
      }
    }
  }

  .home-butt {
    position: fixed;
    bottom: 0;
    left: 0;
    box-sizing: border-box;
    width: 100%;
    padding: 40rpx 32rpx;
    background-color: #ffffff;

    .but {
      box-sizing: border-box;
      color: #ffffff;
      background: linear-gradient(-90deg, #8dc9f1, #d8eefc);
      border-radius: 40rpx;
      line-height: 80rpx;
      border: 0;
    }

    .but1 {
      border: 1rpx solid rgba($color: #000000, $alpha: 0.3);
      background: linear-gradient(-90deg, #ffffff, #ffffff);
      color: rgba($color: #000000, $alpha: 0.3);
    }
  }

  .popup {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    width: 492rpx;
    border-radius: 20rpx;
    background-color: #ffffff;
    overflow: hidden;

    .p-title {
      position: relative;

      .t-text {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 32rpx;
        font-weight: 600;
        color: #ffffff;
      }
    }

    .p-b-box {
      height: 40rpx;
    }

    .p-b-card {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      margin: 50rpx;

      .c-text {
        font-size: 24rpx;
        font-weight: 600;
        color: #333333;
        margin-bottom: 16rpx;
      }

      .c-text1 {
        text-align: center;
        line-height: 1.8em;
      }
    }
  }

  .p-b-but {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    margin-bottom: 34rpx;
    padding: 0 54rpx;

    .but {
      flex: 1;
      line-height: 60rpx;
      border: 1rpx solid #b7b7b7;
      border-radius: 30rpx;
      font-size: 24rpx;
      font-weight: 600;
      color: #999999;
      margin: 0;
      padding: 0;
      background-color: #ffffff;
    }

    .but1 {
      border: 1rpx solid rgba($color: #000000, $alpha: 0);
      color: #ffffff;
      background: linear-gradient(101deg, #8dc9f1 0%, #d8eefc 100%);
      margin-left: 76rpx;
    }

    .but::after {
      display: none;
    }
  }

  .get-tate {
    width: 100%;
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
    border-top-left-radius: 20rpx;
    border-top-right-radius: 20rpx;
    overflow: hidden;

    .g-t-box {
      width: 100%;
      flex: 1;
      display: flex;
      flex-direction: column;
      margin-bottom: 36rpx;

      .scroll-h {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 100rpx;
        margin: 20rpx 0;
        background-color: #ffffff;

        &-text {
          font-size: 48rpx;
          font-weight: 500;
          color: #000000;
        }

        .uni-tab-item {
          position: relative;
          flex: 1;
          display: inline-block;
          text-align: center;
        }

        .uni-tab-item-title {
          color: #000000;
          font-size: 28rpx;
          font-weight: 600;
          height: 80rpx;
          line-height: 80rpx;
          opacity: 0.7;
        }

        .uni-tab-item-text {
          position: absolute;
          bottom: 8rpx;
          left: 50%;
          transform: translateX(-50%);
          height: 4rpx;
          width: 36rpx;
          background: linear-gradient(255deg, #8dc9f1, #d8eefc);
          border-radius: 2rpx;
        }

        // 中间内容选项卡 字体样式
        .uni-tab-item-title-active {
          color: #000000;
          font-size: 34rpx;
          font-weight: 600;
          opacity: 1;
        }
      }

      .swiper {
        width: 100%;
        flex: 1;
        box-sizing: border-box;
        padding: 50rpx 34rpx;
        overflow: auto;

        .swiper-item {
          .a-b-con {
            flex: 1;
            box-sizing: border-box;
            overflow: auto;
            margin-bottom: 20rpx;

            .uni-col {
              box-sizing: border-box;
              padding: 0 20rpx !important;
              margin-bottom: 20rpx;

              .a-b-col-box {
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                height: 152rpx;
                background: #ececec;
                border: 0;
                border-radius: 20rpx;
                overflow: hidden;

                .text {
                  font-size: 30rpx;
                  font-weight: 500;
                  color: #000000;
                }

                .text1 {
                  margin-bottom: 10rpx;
                }
              }

              .c-box {
                background: linear-gradient(-90deg, #8dc9f1, #d8eefc);

                .text {
                  color: #ffffff;
                }
              }
            }
          }
        }
      }
    }

    .p-b-but {
      padding: 0 102rpx;

      .but {
        font-size: 28rpx;
        line-height: 68rpx;
      }

      .but1 {
        margin-left: 86rpx;
      }

      .but2 {
      }
    }
  }
}

/deep/ .u-mode-center-box {
  background-color: transparent !important;
}

.index {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  // height: 100vh;
  overflow: hidden;

  .index-img {
    width: 230rpx;
    height: 230rpx;
    margin-bottom: 80rpx;
  }

  .index-text {
    width: 410rpx;
    text-align: center;
    font-size: 34rpx;
    font-weight: 600;
    color: #28292c;
    margin-bottom: 200rpx;
  }

  .index-butt {
    .but {
      font-size: 34rpx;
      width: 560rpx;
      font-weight: 500;
      color: #ffffff;
      background: linear-gradient(-90deg, #8dc9f1, #d8eefc);
      border-radius: 48rpx;
      line-height: 96rpx;
      border: 0;
    }

    .but1 {
      background: linear-gradient(-90deg, #48aeec, #5ebff8);
      margin-top: 40rpx;
    }
  }

  .popup {
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    width: 492rpx;
    border-radius: 20rpx;
    background-color: #ffffff;
    overflow: hidden;

    .p-title {
      position: relative;

      .t-text {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 32rpx;
        font-weight: 600;
        color: #ffffff;
      }
    }

    .p-b-box {
      height: 40rpx;
    }

    .p-b-card {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      margin: 50rpx;

      .c-text {
        font-size: 24rpx;
        font-weight: 600;
        color: #333333;
        margin-bottom: 16rpx;
      }

      .c-text1 {
        text-align: center;
        line-height: 1.8em;
      }
    }
  }

  .p-b-but {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    margin-bottom: 34rpx;
    padding: 0 54rpx;

    .but {
      flex: 1;
      line-height: 60rpx;
      border: 1rpx solid #b7b7b7;
      border-radius: 30rpx;
      font-size: 24rpx;
      font-weight: 600;
      color: #999999;
      margin: 0;
      padding: 0;
      background-color: #ffffff;
    }

    .but1 {
      border: 1rpx solid rgba($color: #000000, $alpha: 0);
      color: #ffffff;
      background: linear-gradient(101deg, #8dc9f1 0%, #d8eefc 100%);
      margin-left: 76rpx;
    }

    .but2 {
      display: inline-block;
      width: 218rpx;
      color: #ffffff;
      background: linear-gradient(101deg, #8dc9f1 0%, #d8eefc 100%);
    }

    .but::after {
      display: none;
    }
  }

  .get-tel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    width: 508rpx;
    padding: 40rpx;
    border-radius: 20rpx;
    overflow: hidden;
    background-color: #ffffff;

    .ionc {
      position: absolute;
      top: 16rpx;
      right: 16rpx;
    }

    .tel-title {
      font-size: 50rpx;
      font-size: #000000;
      font-weight: 500;
      margin-bottom: 40rpx;
    }

    .tel-text {
      font-size: 32rpx;
      font-size: #737373;
      font-weight: 500;
      text-align: center;
    }

    .but {
      display: flex;
      justify-content: center;
      width: 100%;
      margin-top: 100rpx;

      .butt {
        font-size: 40rpx;
        font-weight: 500;
        color: #ffffff;
        background: linear-gradient(-90deg, #8dc9f1, #d8eefc);
        border-radius: 40rpx;
        line-height: 80rpx;
        border: 0;
        padding: 0 60rpx;
      }
    }
  }
}
.tabbar{
	width: 100%;
	height: 126rpx;
	background-color: #fff;
	position: fixed;
	bottom: 0;
	left: 0;
	z-index: 9;
	display: flex;
	box-shadow: 0 -2rpx 8rpx 0 rgba(0,0,0,0.2);
	box-sizing: border-box;
	border-radius: 13rpx 13rpx 0 0;
	.tab-item{
		flex: 1;
		text-align: center;
		font-size: 20rpx;
		padding-top: 26rpx;
		color: #5b5b5b;
		image{
			width: 42rpx;
			height: 46rpx;
			margin-bottom: 10rpx;
		}
	}
	.tab-item:last-child{
		color: #000000;
		font-weight: bold;
	}
}
.home-tab {
		  // background-color: #fff;
        .uni-col {
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
          margin-bottom: 32rpx;

          .h-t-img {
            width: 80rpx;
            height: 80rpx;
            margin-bottom: 10rpx;
          }

          .h-t-text {
            font-size: 24rpx;
            font-weight: 500;
            color: #333333;
          }
        }
      }
.award-box{
	width: 690rpx;
	height: 200rpx;
	border-radius: 40rpx;
	background-color: #fff;
	margin: 0 auto;
	overflow: hidden;
	margin-top: -88rpx;
	z-index: 22;
	margin-bottom: 32rpx;
	padding: 30rpx;
	box-sizing: border-box;
	.award-title{
		font-size: 26rpx;
		margin-bottom: 30rpx;
	}
	.award-btn{
		width: 180rpx;
		height: 64rpx;
		text-align: center;
		line-height: 64rpx;
		font-size: 32rpx;
		color: #fff;
		border-radius: 64rpx;
		float: right;
		background: linear-gradient(to right,#FF934C,#FC686F);
	}
	.award-price{
		font-size: 62rpx;
		font-weight: 600;
	}
}
</style>
